Skip to content

Add FIM (fill-in-the-middle) completion support for DeepSeek - #6739

Open
guanxuc wants to merge 1 commit into
spring-projects:mainfrom
guanxuc:deepseek-fim-completion
Open

Add FIM (fill-in-the-middle) completion support for DeepSeek#6739
guanxuc wants to merge 1 commit into
spring-projects:mainfrom
guanxuc:deepseek-fim-completion

Conversation

@guanxuc

@guanxuc guanxuc commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

This change adds support for DeepSeek's beta FIM (fill-in-the-middle) parameters — echo and suffix — across the DeepSeek model integration. With suffix set, callers can ask the
model to complete text that bridges a given prompt and a trailing suffix, and echo=true instructs the API to echo the prompt back alongside the completion.

Referer

FIM completion API Guide
FIM completion API

Verify

./mvnw -am -pl spring-ai-model -Dit.test=org.springframework.ai.deepseek.chat.DeepSeekChatModelIT#suffixCompletionTest -Dfailsafe.failIfNoSpecifiedTests=false -Dmaven.build.cache.enabled=false verify
image

Signed-off-by: guanxu <1510424541@qq.com>
@guanxuc
guanxuc force-pushed the deepseek-fim-completion branch from 9d5d8cd to e9bfcf4 Compare August 5, 2026 15:43
@guanxuc

guanxuc commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Hi @dimitarproynov ,

Could you please take a look this PR when you are free? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants